export function maxLength(e, max) {
  if (e.target.value.length >= max) {
    e.target.value = e.target.value.substr(0, max);
  }
}